package java基础知识.集合.list;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Stream;

/**
 * @author coderFu
 * @create 2022/3/10
 * ArrayList
 */
public class CoderArrayList {

    public static void main(String[] args) {

        // 探究底层存储结构
        ArrayList<Integer> list  = new ArrayList<>();
       list.add(10);
       list.add(8);
       list.add(15);
       list.add(7);
       list.sort(Comparator.comparing(Integer::intValue));
        System.out.println(list);
       // list.iterator()
        Stream<Integer> stream = list.stream();

        int oldCapacity = 10;
        oldCapacity = oldCapacity >> 1;
      //  int newCapacity = oldCapacity + (oldCapacity >> 1);
        System.out.println(oldCapacity);
       // System.out.println(a);
       // list.ensureCapacity(150);




    }
}
